package my.soft.aiteacher.teacher.pojo;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Map;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_questions")
public class QuestionDO {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long questionnaireId;
    private String title;
    private String content;
    private Integer topicType; // 0: EXCLUSIVE, 1: multiplChoice, 2: judge
    private Integer questionType; // 0: graspingState, 1: BasicInformation, 2: preference
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONObject options; // JSON格式的选项
    private Integer displayOrder;
    private LocalDateTime createdTime;
}